class CreateStoreService
  include Serviceable
  include StatusObject
  def initialize(params)
    # binding.pry
    @params = params
  end

  def call
    ActiveRecord::Base.transaction do
      @store = Store.create!(@params)
    end
    Status.new(success: true, message: '创建酒店成功', obj: @store)
  rescue => e
    Status.new(success: false, message: e.message, obj: nil)
  end
end
